#include "stdafx.h"
#include "detail/bmock_out_arg_val.hpp"

namespace bmock {
	const char *out_arg_val::UNKNOWN = "\?\?\?";

	out_arg_val::out_arg_val(const char *const n)
		:arg_val(n)
	{}

	out_arg_val::~out_arg_val() {
	}

	void out_arg_val::print(std::ostream &os) const {
		os << "OUT(" << UNKNOWN << ")";
	}

	std::string out_arg_val::get_out_value(const arg_checker &) const {
		return get_out_value();
	}

	std::string out_arg_val::get_out_value() const {
		std::string x(UNKNOWN);
		return x;
	}

	bool out_arg_val::null_expected(const std::string &v) const {
		return (NULL_STR==v);
	}

	bool out_arg_val::update(const arg_checker &chk,const std::string &v) const {
		if(chk.check_ptr(name_,null_expected(v),null_supplied())) return true;
		if(null_expected(v)&&null_supplied()) return false;
		return update_out_value(chk,v);
	}
}